package cn.mumzone.pos.api.service;


import java.util.HashMap;

import cn.mumzone.basic.net.response.BaseResponse;
import cn.mumzone.pos.model.MemberEntity;
import cn.mumzone.pos.model.SettleCalculatePriceEntity;
import cn.mumzone.pos.model.SettleDiscountAreaEntity;
import cn.mumzone.pos.model.SettleResultEntity;
import retrofit2.Response;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by lijiateng on 2018/12/12.
 */

public interface SettleService {

    @GET("egg_member/api/v1/pos/endBill/selectMemberInfo")
    Observable<Response<BaseResponse<MemberEntity>>> getMemberInfo(@Query("phone") String phone);

    @FormUrlEncoded
    @POST("egg_goods/api/v1.2/pos/endBill/calculateAmountToPay")
    Observable<Response<BaseResponse<SettleCalculatePriceEntity>>> getGoodsAmount(@FieldMap HashMap<String, String> settleMap);

    @FormUrlEncoded
    @POST("egg_goods/api/v1.2/pos/endBill/getPreferentialInfoUE")
    Observable<Response<BaseResponse<SettleDiscountAreaEntity>>> getDiscountAreaInfo(@FieldMap HashMap<String, String> requestMap);

    @FormUrlEncoded
    @POST("egg_goods/api/v1.2/pos/endBill/orderSettleAccounts")
    Observable<Response<BaseResponse<SettleResultEntity>>> getSettleResult(@FieldMap HashMap<String, String> requestMap);


    @FormUrlEncoded
    @POST("egg_goods/api/v1.3/pos/endBill/payCallBackToPhysicalStore")
    Observable<Response<BaseResponse<SettleResultEntity>>> payCallBackToPhysicalStore(@FieldMap HashMap<String, String> requestMap);

    @GET("egg_goods/api/v2/pos/endBill/querySmPayOrderInfo")
    Observable<Response<BaseResponse<SettleResultEntity>>> querySmPayOrderInfo(@Query("orderId")String orderId);

    @FormUrlEncoded
    @POST("egg_order/api/v2.2/pos/order/saveOrderIntegral")
    Observable<Response<BaseResponse<String>>> saveOrderIntegral(@FieldMap HashMap<String, String> requestMap);

    @GET("egg_goods/api/v1.3/pos/personal/getInTimeOrgAccess")
    Observable<Response<BaseResponse<String>>> getEraseCeiling();

    @GET("egg_goods/api/v1/pos/business/clearCartGoods")
    Observable<Response<BaseResponse<String>>> clearGoodsCart(@Query("storeId") String shopId);

}
